home *** CD-ROM | disk | FTP | other *** search
- Path: news.iadfw.net!usenet
- From: Larry Weiss <lfw@iadfw.net>
- Newsgroups: comp.lang.c
- Subject: Re: [Q] Does free() work?
- Date: Sat, 24 Feb 1996 15:59:45 -0600
- Organization: ---
- Message-ID: <312F8A51.26B3@iadfw.net>
- References: <4gm3ss$qfa@news.infoserve.net> <Pine.A32.3.91.960223233526.113482D-100000@black.weeg.uiowa.edu> <312F7372.2257@iadfw.net> <Pine.A32.3.91.960224145844.39802C-100000@black.weeg.uiowa.edu>
- NNTP-Posting-Host: dal09-01.ppp.iadfw.net
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win16; I)
-
- The Amorphous Mass wrote:
- > > The Amorphous Mass wrote:
- > Would you agree then that allowing malloc() to be abstracted from
- > actual memory allocation makes it faster on those platforms (like my
- > antiquated Mac) where on-demand memory allocation is slow (or for other
- > reasons), while allowing it to use on-demand memory allocation when
- > that's more appropriate without changing the semantics? What's important
- > is not that these things are always true in up-to-the-minute hardware, but
- > that they are the rationale behind malloc()'s current implementation.
- > Question: I'm thinking of writing a modest C compiler for the Mac,
- > which prefers that memory be allocated and referred to through handles
- > (at least the 68K Macs do). Would it be conforming to have
- > malloc()/free() allocate through handles, and then transparently add one
- > additional layer of indirection so that the programmer could still think
- > in terms of pointers? The compiler I have now literally uses pointers,
- > which causes fragmentation.
- > I suppose this is more comp.std.c, but I'm almost afraid to post there. :)
- >
-
- We discussed this sometime ago in the context of an IBM AIX (RS 6000) system
- memory allocation scheme, that even defered actual allocation until the initial
- reference to the area allocated. I hope the experts here can help
- you with your interesting implementation ideas. There was opinion in all
- directions regarding the suitability of AIX's methods as conforming to the
- C Standard's specifications. I'm not sure that I remember a concensus
- opinion.
-
- Any implementation ideas for the Standard library should be most suitable
- for news:comp.std.c .
-